package cn.demo.app.activiti;
import javax.sql.DataSource;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: float 2023/8/10 14:21
 */
@Configuration
public class ActivityConfiguration {

    @Bean
    public DataSource database() {
        return DataSourceBuilder.create()
                .url("jdbc:mysql://127.0.0.1:3306/activiti?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC&nullCatalogMeansCurrent=true")
                .username("root")
                .password("yzg476")
                .driverClassName("com.mysql.cj.jdbc.Driver")
                .build();
    }
}
